package org.wukongcrm.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 商机产品关联表
    */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "business_product_relation")
public class BusinessProductRelation implements Serializable {
    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    /**
     * 商机id
     */
    @TableField(value = "business_id")
    private Integer businessId;

    /**
     * 产品id
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 产品单价
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 销售价格
     */
    @TableField(value = "sales_price")
    private BigDecimal salesPrice;

    /**
     * 数量
     */
    @TableField(value = "num")
    private BigDecimal num;

    /**
     * 折扣
     */
    @TableField(value = "discount")
    private Integer discount;

    /**
     * 小计（折扣后价格）
     */
    @TableField(value = "subtotal")
    private BigDecimal subtotal;

    /**
     * 单位
     */
    @TableField(value = "unit")
    private String unit;

    private static final long serialVersionUID = 1L;
}